package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the RECIBO_TITULO database table.
 * 
 */
@Embeddable
public class ReciboTituloPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;
	private long refnumTitu;
	private long nsRecibo;

    public ReciboTituloPK() {
    }

	@Column(name="REFNUM_TITU", unique=true, nullable=false)
	public long getRefnumTitu() {
		return this.refnumTitu;
	}
	public void setRefnumTitu(long refnumTitu) {
		this.refnumTitu = refnumTitu;
	}

	@Column(name="NS_RECIBO", unique=true, nullable=false)
	public long getNsRecibo() {
		return this.nsRecibo;
	}
	public void setNsRecibo(long nsRecibo) {
		this.nsRecibo = nsRecibo;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof ReciboTituloPK)) {
			return false;
		}
		ReciboTituloPK castOther = (ReciboTituloPK)other;
		return 
			(this.refnumTitu == castOther.refnumTitu)
			&& (this.nsRecibo == castOther.nsRecibo);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + ((int) (this.refnumTitu ^ (this.refnumTitu >>> 32)));
		hash = hash * prime + ((int) (this.nsRecibo ^ (this.nsRecibo >>> 32)));
		
		return hash;
    }
}